const Router = require('koa-router');
const {auth} = require('../middleware/auth.middleware')
const {validator} = require('../middleware/cart.middleware')

const {add} = require('../controller/cart.controller')
/**
 * @param auth 验证登录中间件
 * @param hadAdminPermission 验证token中间件
 */

//实例化router对象
const router = new Router({prefix:'/cart'});


router.post('/',auth,validator,add)

module.exports = router